package com.heartskyhigh.order.exception;

import com.heartskyhigh.order.enums.ResultEnum;

/**
 * @author Luo Zhen
 * @create 2019-11-19 16:41
 */
public class OrderException extends RuntimeException {

    private Integer code;

    public OrderException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public OrderException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }
}
